package com.company.card_service.controller;


import com.company.card_service.serviceImpl.EmployeeViewServiceImpl;
import com.company.card_service.vo.ChartResVo;
import com.company.card_service.vo.EmployeeViewVo;
import com.company.card_service.vo.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "后端折线图接口")
@RestController
@RequestMapping("admin/manger/statistics")
public class PCExposureStatisticsController {

    @Autowired
    EmployeeViewServiceImpl employeeViewService;

    @ApiOperation("公司曝光折线图")
    @GetMapping("/getStatisticsView/{companyId}")
    public Result getStatisticsView(@PathVariable Integer companyId){

        ChartResVo chartData = employeeViewService.getChartDataByCompany(companyId);//七天的数据
        return Result.success(chartData);
    }

    @ApiOperation("后台客户数量折线图")
    @GetMapping("/getStatisticsUserView/{companyId}")
    public Result getStatisticsUserView(@PathVariable Integer companyId){
        ChartResVo chartData = employeeViewService.getChartDataByCompany(companyId);//七天的数据
        return Result.success(chartData);
    }
}
